package biz.almas.uycnr.crawler.crawler.timer;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;



@WebListener
public class TaskListener implements ServletContextListener {

	private UYCNRTimerTask uycnrTimerTask = new UYCNRTimerTask();
	private KZCNRTimerTask kzcnrTimerTask = new KZCNRTimerTask();
	
	public void contextInitialized(ServletContextEvent sce) {
		uycnrTimerTask.start();
		kzcnrTimerTask.start();
	}

	public void contextDestroyed(ServletContextEvent sce) {
		uycnrTimerTask.cancel();
		kzcnrTimerTask.cancel();
	}
}
